<?php
/**
 * Created by PhpStorm.
 * User: 12133
 * Date: 2025/6/24
 * Time: 11:08
 */

namespace app\controller\api;
use \app\model\Nav AS model;

use app\controller\Base;

class Nav extends Base{
    public function list(){
        $where = [];
        $list = model::where($where)
            ->select();
        return $this->msg($list);
    }

    public function tree(){
        $list = model::select()->toArray();
        $tree = getTree($list);
        return $this->msg($tree);
    }

    public function info($id){
        $info = model::find($id);
        return $this->msg($info);
    }
}